package cn.baker.rabbitmq.config;

import cn.baker.rabbitmq.service.TransMessageService;
import cn.baker.rabbitmq.task.ResendTask;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * @author yuanyu
 */
@Configuration
@EnableScheduling
@AutoConfigureAfter(TransRabbitConfig.class)
public class ResendTaskConfig {
    @Bean
    ResendTask resendTask(TransMessageService transMessageService, RabbitTemplate transRabbitTemplate, TransRabbitProperties transRabbitProperties) {
        return new ResendTask(transMessageService, transRabbitTemplate, transRabbitProperties);
    }
}
